package com.starnet.yarnmonitor.security.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.starnet.yarnmonitor.security.entity.SysPermission;
import com.starnet.yarnmonitor.security.mapper.SysPermissionMapper;
import com.starnet.yarnmonitor.security.service.SysPermissionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 权限表 服务实现类
 * </p>
 *
 * @author 陈佳豪
 * @since 2022-05-16
 */
@Service
public class SysPermissionServiceImpl implements SysPermissionService {
    @Autowired
    SysPermissionMapper sysPermissionMapper;

    @Override
    public List<SysPermission> selectListByUser(int userId) {
        List<SysPermission>  sysPermissions= sysPermissionMapper.selectListByUser(userId);
        return sysPermissions;
    }

    @Override
    public List<SysPermission> selectListByPath(String requestUrl) {
        List<SysPermission> sysPermissions = sysPermissionMapper.selectListByPath(requestUrl);
        return sysPermissions;
    }
}
